
#include "eqibutils.h"
#include <QApplication>
#include<QDebug>
#include<QDate>
#include<eqibcontrol.h>
#include<QThread>
#include<QIcon>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    //a.setLibraryPaths(a.applicationDirPath());

    QSplashScreen splash(QPixmap(":/resources/imgs/splash.jpg"));
    splash.showMessage("power by zhangkun@2014 1.0 test version",Qt::AlignRight | Qt::AlignBottom);
    splash.show();

    a.setWindowIcon(QIcon(":/resources/imgs/app_logo.ico"));
    a.setApplicationDisplayName("Easy QT Internet Browser");
    a.setApplicationVersion("1.0");
    a.setApplicationName("EQIBrowser");
    EQIBUtils::get()->app = &a;
    EQIBUtils::get()->init();
    EQIBControl c;
    qDebug() << "Start at :" << QDate::currentDate();
    c.addPage(EQIBUtils::get()->getDefaultPage());
    //c.addPage("http://baidu.com");
    QThread::sleep(3);
    c.show();

    splash.close();
    int status =  a.exec();
    delete EQIBUtils::get();
    return status;
}
